using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;

namespace Sustainalytics.Entities.ESGRatings
{
  
    public class EsgThreshold<T> : IEntity
    {
        public Guid Id { get; set; }

        public string PeerGroup { get; set; }

        public Guid PeerGroupId { get; set; }

        public T Value { get; set; }

        public double LowerBound { get; set; }

        public double UpperBound { get; set; }

        [BsonRepresentation(BsonType.String)]
        public ThresholdType Type { get; set; }

        public DateTime UploadTime { get; set; } //for historical and debug purposes

        public Guid ThresholdGroupId { get; set; } //for historical and debug purposes
    }

    public class EsgFocusThresholds : EsgThreshold<string>
    {
    }

    public enum ThresholdType
    {
        Overall,
        Environment,
        Social,
        Governance
    }
}